﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Category.aspx.cs" Inherits="Default3" %>
<asp:Content ID="content4" ContentPlaceHolderID="head" runat="server"><asp:PlaceHolder ID="cphHead" runat="server"></asp:PlaceHolder></asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="left" runat="server"></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="right" runat="server"></asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <h1><asp:Literal ID="CatLiteral" runat="server"></asp:Literal></h1>
    <div id="gamediv">
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="Id" DataSourceID="SqlDataSource1">
            <AlternatingItemTemplate>
                <li><a href="/Game/<%# Eval("latin_title") %>">
                    <img src="<%# Eval("thumbnail") %>" alt="<%# Eval("title") %>" class="thumb1" longdesc="<%# Eval("title") %>" src="<%# Eval("latin_title") %>" title="<%# Eval("title") %>"></a>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <tr style="">
                    <td>
                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                    </td>
                    <td>
                        <asp:Label ID="IdLabel1" runat="server" Text='<%# Eval("Id") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="categoriesTextBox" runat="server" Text='<%# Bind("categories") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="latin_titleTextBox" runat="server" Text='<%# Bind("latin_title") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="swfTextBox" runat="server" Text='<%# Bind("swf") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="thumbnailTextBox" runat="server" Text='<%# Bind("thumbnail") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="large_imgTextBox" runat="server" Text='<%# Bind("large_img") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="addedTextBox" runat="server" Text='<%# Bind("added") %>' />
                    </td>
                    <td>
                        <asp:CheckBox ID="activeCheckBox" runat="server" Checked='<%# Bind("active") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="plays_totalTextBox" runat="server" Text='<%# Bind("plays_total") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="plays_todayTextBox" runat="server" Text='<%# Bind("plays_today") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="keywordsTextBox" runat="server" Text='<%# Bind("keywords") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("description") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="controlsTextBox" runat="server" Text='<%# Bind("controls") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="heightTextBox" runat="server" Text='<%# Bind("height") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="widthTextBox" runat="server" Text='<%# Bind("width") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="votesTextBox" runat="server" Text='<%# Bind("votes") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="votes_valueTextBox" runat="server" Text='<%# Bind("votes_value") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="ratingTextBox" runat="server" Text='<%# Bind("rating") %>' />
                    </td>
                    <td>
                        <asp:CheckBox ID="featuredCheckBox" runat="server" Checked='<%# Bind("featured") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="game_tagTextBox" runat="server" Text='<%# Bind("game_tag") %>' />
                    </td>
                </tr>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" style="">
                    <tr>
                        <td>No data was returned.</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <tr style="">
                    <td>
                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                    </td>
                    <td>&nbsp;</td>
                    <td>
                        <asp:TextBox ID="categoriesTextBox" runat="server" Text='<%# Bind("categories") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="latin_titleTextBox" runat="server" Text='<%# Bind("latin_title") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="swfTextBox" runat="server" Text='<%# Bind("swf") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="thumbnailTextBox" runat="server" Text='<%# Bind("thumbnail") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="large_imgTextBox" runat="server" Text='<%# Bind("large_img") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="addedTextBox" runat="server" Text='<%# Bind("added") %>' />
                    </td>
                    <td>
                        <asp:CheckBox ID="activeCheckBox" runat="server" Checked='<%# Bind("active") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="plays_totalTextBox" runat="server" Text='<%# Bind("plays_total") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="plays_todayTextBox" runat="server" Text='<%# Bind("plays_today") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="keywordsTextBox" runat="server" Text='<%# Bind("keywords") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("description") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="controlsTextBox" runat="server" Text='<%# Bind("controls") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="heightTextBox" runat="server" Text='<%# Bind("height") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="widthTextBox" runat="server" Text='<%# Bind("width") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="votesTextBox" runat="server" Text='<%# Bind("votes") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="votes_valueTextBox" runat="server" Text='<%# Bind("votes_value") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="ratingTextBox" runat="server" Text='<%# Bind("rating") %>' />
                    </td>
                    <td>
                        <asp:CheckBox ID="featuredCheckBox" runat="server" Checked='<%# Bind("featured") %>' />
                    </td>
                    <td>
                        <asp:TextBox ID="game_tagTextBox" runat="server" Text='<%# Bind("game_tag") %>' />
                    </td>
                </tr>
            </InsertItemTemplate>
            <ItemTemplate>
                <li><a href="/Game/<%# Eval("latin_title") %>">
                    <img src="<%# Eval("thumbnail") %>" alt="<%# Eval("title") %>" class="thumb1" longdesc="<%# Eval("title") %>" src="<%# Eval("latin_title") %>" title="<%# Eval("title") %>"></a>
            </ItemTemplate>
            <LayoutTemplate>
                <ul class="gamelist">
                    <asp:PlaceHolder ID="itemPlaceholderContainer" runat="server" />
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                </ul>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <tr style="">
                    <td>
                        <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                    </td>
                    <td>
                        <asp:Label ID="categoriesLabel" runat="server" Text='<%# Eval("categories") %>' />
                    </td>
                    <td>
                        <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                    </td>
                    <td>
                        <asp:Label ID="latin_titleLabel" runat="server" Text='<%# Eval("latin_title") %>' />
                    </td>
                    <td>
                        <asp:Label ID="swfLabel" runat="server" Text='<%# Eval("swf") %>' />
                    </td>
                    <td>
                        <asp:Label ID="thumbnailLabel" runat="server" Text='<%# Eval("thumbnail") %>' />
                    </td>
                    <td>
                        <asp:Label ID="large_imgLabel" runat="server" Text='<%# Eval("large_img") %>' />
                    </td>
                    <td>
                        <asp:Label ID="addedLabel" runat="server" Text='<%# Eval("added") %>' />
                    </td>
                    <td>
                        <asp:CheckBox ID="activeCheckBox" runat="server" Checked='<%# Eval("active") %>' Enabled="false" />
                    </td>
                    <td>
                        <asp:Label ID="plays_totalLabel" runat="server" Text='<%# Eval("plays_total") %>' />
                    </td>
                    <td>
                        <asp:Label ID="plays_todayLabel" runat="server" Text='<%# Eval("plays_today") %>' />
                    </td>
                    <td>
                        <asp:Label ID="keywordsLabel" runat="server" Text='<%# Eval("keywords") %>' />
                    </td>
                    <td>
                        <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>' />
                    </td>
                    <td>
                        <asp:Label ID="controlsLabel" runat="server" Text='<%# Eval("controls") %>' />
                    </td>
                    <td>
                        <asp:Label ID="heightLabel" runat="server" Text='<%# Eval("height") %>' />
                    </td>
                    <td>
                        <asp:Label ID="widthLabel" runat="server" Text='<%# Eval("width") %>' />
                    </td>
                    <td>
                        <asp:Label ID="votesLabel" runat="server" Text='<%# Eval("votes") %>' />
                    </td>
                    <td>
                        <asp:Label ID="votes_valueLabel" runat="server" Text='<%# Eval("votes_value") %>' />
                    </td>
                    <td>
                        <asp:Label ID="ratingLabel" runat="server" Text='<%# Eval("rating") %>' />
                    </td>
                    <td>
                        <asp:CheckBox ID="featuredCheckBox" runat="server" Checked='<%# Eval("featured") %>' Enabled="false" />
                    </td>
                    <td>
                        <asp:Label ID="game_tagLabel" runat="server" Text='<%# Eval("game_tag") %>' />
                    </td>
                </tr>
            </SelectedItemTemplate>
        </asp:ListView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gamesConnectionString %>" SelectCommand="SELECT * FROM [Game] where Active=1 order by plays_total desc"></asp:SqlDataSource>

    <div id="datapager">
        <asp:DataPager ID="DataPager1" PageSize="30" PagedControlID="ListView1" runat="server" QueryStringField="page">
            <Fields>
                <asp:NumericPagerField ButtonCount="10"
                    NumericButtonCssClass="numeric_button"
                    CurrentPageLabelCssClass="current_page"
                    NextPreviousButtonCssClass="next_button" />
            </Fields>

        </asp:DataPager>
    </div>

</asp:Content>

